public class Ability
{
    /// <summary>
    /// 获取技能字符串属性
    /// </summary>
    /// <param name="attr"> 标记名 </param>
    /// <returns>字符串属性</returns>
    public extern string api_get_str_attr(string attr);

    /// <summary>
    /// 设置技能字符串属性
    /// </summary>
    /// <param name="attr"> 标记名 </param>
    /// <param name="value"> 字符串值 </param>
    /// <returns></returns>
    public extern void api_set_str_attr(string attr,string value);

    /// <summary>
    /// 设置技能名字
    /// </summary>
    /// <param name="value"> 字符串值 </param>
    /// <returns></returns>
    public extern void api_set_name(string value);

    /// <summary>
    /// 获取技能拥有者
    /// </summary>
    /// <returns>技能拥有者</returns>
    public extern Unit api_get_owner();

    /// <summary>
    /// 获取技能拥有者id
    /// </summary>
    /// <returns>技能拥有者id</returns>
    public extern int? api_get_owner_id();

    /// <summary>
    /// 获取技能类型
    /// </summary>
    /// <returns>技能类型</returns>
    public extern int? api_get_type();

    /// <summary>
    /// 获取技能类型
    /// </summary>
    /// <returns>技能序号</returns>
    public extern int? api_get_ability_index();

    /// <summary>
    /// 获取技能拥有者
    /// </summary>
    /// <returns>技能Seq</returns>
    public extern int? api_get_ability_seq();

    /// <summary>
    /// 获取技能释放类型
    /// </summary>
    /// <returns>技能释放类型</returns>
    public extern int? api_get_ability_cast_type();

    /// <summary>
    /// 获取技能全局唯一id
    /// </summary>
    /// <returns>技能全局唯一id</returns>
    public extern int? api_get_ability_global_id();

    /// <summary>
    /// 移除技能
    /// </summary>
    /// <returns></returns>
    public extern void api_remove();

    /// <summary>
    /// 获取技能的等级
    /// </summary>
    /// <returns>技能等级</returns>
    public extern int? api_get_level();

    /// <summary>
    /// 是否拥有标记
    /// </summary>
    /// <param name="tag"> 标记名 </param>
    /// <returns>是否有标记</returns>
    public extern bool? has_tag(string tag);

    /// <summary>
    /// 移除键值对
    /// </summary>
    /// <param name="k"> 键 </param>
    /// <returns></returns>
    public extern void api_remove_kv(string k);

    /// <summary>
    /// 计算公式类型KV
    /// </summary>
    /// <param name="k"> 键 </param>
    /// <returns>值</returns>
    public extern Fix32 api_calc_ability_formula_kv(string k);

    /// <summary>
    /// 添加定时器
    /// </summary>
    /// <param name="time"> 定时时长 </param>
    /// <param name="callback"> 超时函数 </param>
    /// <returns></returns>
    public extern void add_timer(Fix32 time,dynamic callback);

    /// <summary>
    /// 技能对象是否拥有目标
    /// </summary>
    /// <param name="runtime_id"> runtime_id </param>
    /// <returns>技能对象是否拥有目标</returns>
    public extern bool? api_has_target(int? runtime_id);

    /// <summary>
    /// 获取技能释放的位置
    /// </summary>
    /// <param name="runtime_id"> runtime_id </param>
    /// <returns>技能释放的位置</returns>
    public extern Point api_get_release_position(int? runtime_id);

    /// <summary>
    /// 获取技能释放的方向
    /// </summary>
    /// <param name="runtime_id"> runtime_id </param>
    /// <returns>技能释放的方向</returns>
    public extern Fix32 api_get_release_direction(int? runtime_id);

    /// <summary>
    /// 获取技能实数属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <returns>实数属性值</returns>
    public extern Fix32 api_get_float_attr(string attr);

    /// <summary>
    /// 获取技能整数属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <returns>整数属性值</returns>
    public extern int? api_get_int_attr(string attr);

    /// <summary>
    /// 获取技能布尔属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <returns>布尔属性值</returns>
    public extern bool? api_get_bool_attr(string attr);

    /// <summary>
    /// 获取技能释放范围
    /// </summary>
    /// <returns>释放范围</returns>
    public extern Fix32 api_get_ability_cast_range();

    /// <summary>
    /// 设置技能释放范围
    /// </summary>
    /// <param name="value"> 释放范围 </param>
    /// <returns></returns>
    public extern void api_set_ability_cast_range(Fix32 value);

    /// <summary>
    /// 设置技能的建造朝向
    /// </summary>
    /// <param name="value"> 建造朝向 </param>
    /// <returns></returns>
    public extern void api_set_ability_build_rotate(Fix32 value);

    /// <summary>
    /// 设置扇形指示器半径
    /// </summary>
    /// <param name="value"> 指示器半径 </param>
    /// <returns></returns>
    public extern void api_set_ability_sector_radius(Fix32 value);

    /// <summary>
    /// 设置扇形指示器角度
    /// </summary>
    /// <param name="value"> 指示器角度 </param>
    /// <returns></returns>
    public extern void api_set_ability_sector_angle(Fix32 value);

    /// <summary>
    /// 设置箭头/多段指示器宽度
    /// </summary>
    /// <param name="value"> 释放范围 </param>
    /// <returns></returns>
    public extern void api_set_ability_arrow_width(Fix32 value);

    /// <summary>
    /// 设置箭头/多段指示器长度
    /// </summary>
    /// <param name="value"> 释放范围 </param>
    /// <returns></returns>
    public extern void api_set_ability_arrow_length(Fix32 value);

    /// <summary>
    /// 设置圆形指示器半径
    /// </summary>
    /// <param name="value"> 释放范围 </param>
    /// <returns></returns>
    public extern void api_set_ability_circle_radius(Fix32 value);

    /// <summary>
    /// 设置技能指示器类型
    /// </summary>
    /// <param name="pointer_type"> 指示器类型 </param>
    /// <returns></returns>
    public extern void api_set_ability_pointer_type(int? pointer_type);

    /// <summary>
    /// 获取技能指示器类型
    /// </summary>
    /// <returns>指示器类型</returns>
    public extern int? api_get_ability_skill_pointer();

    /// <summary>
    /// 设置技能图标
    /// </summary>
    /// <param name="icon_id"> 图标 </param>
    /// <returns></returns>
    public extern void api_set_ability_icon(int? icon_id);

    /// <summary>
    /// 获取技能玩家属性消耗
    /// </summary>
    /// <param name="attr"> 玩家属性名 </param>
    /// <returns>玩家属性消耗</returns>
    public extern Fix32 api_get_ability_player_attr_cost(string attr);

    /// <summary>
    /// 设置技能玩家属性消耗
    /// </summary>
    /// <param name="attr"> 玩家属性名 </param>
    /// <param name="value"> 玩家属性消耗 </param>
    /// <returns></returns>
    public extern void api_set_ability_player_attr_cost(string attr,Fix32 value);

    /// <summary>
    /// 增加技能玩家属性消耗
    /// </summary>
    /// <param name="attr"> 玩家属性名 </param>
    /// <param name="value"> 玩家属性消耗 </param>
    /// <returns></returns>
    public extern void api_add_ability_player_attr_cost(string attr,Fix32 value);

    /// <summary>
    /// 设置技能等级
    /// </summary>
    /// <param name="level"> 技能等级 </param>
    /// <returns></returns>
    public extern void api_set_level(int? level);

    /// <summary>
    /// 学习技能
    /// </summary>
    /// <returns></returns>
    public extern void api_learn_ability();

    /// <summary>
    /// 增加技能等级
    /// </summary>
    /// <param name="level"> 技能等级 </param>
    /// <returns></returns>
    public extern void api_add_level(int? level);

    /// <summary>
    /// 增量修改技能实数属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <param name="value"> 实数属性值 </param>
    /// <returns></returns>
    public extern void api_add_float_attr(string attr,Fix32 value);

    /// <summary>
    /// 设置技能实数属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <param name="value"> 实数属性值 </param>
    /// <returns></returns>
    public extern void api_set_float_attr(string attr,Fix32 value);

    /// <summary>
    /// 增量修改技能整数属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <param name="value"> 整数属性值 </param>
    /// <returns></returns>
    public extern void api_add_int_attr(string attr,int? value);

    /// <summary>
    /// 设置技能整数属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <param name="value"> 整数属性值 </param>
    /// <returns></returns>
    public extern void api_set_int_attr(string attr,int? value);

    /// <summary>
    /// 设置技能布尔属性值
    /// </summary>
    /// <param name="attr"> 属性名 </param>
    /// <param name="value"> 布尔属性值 </param>
    /// <returns></returns>
    public extern void api_set_bool_attr(string attr,bool? value);

    /// <summary>
    /// 阻止当前技能施法
    /// </summary>
    /// <returns></returns>
    public extern void api_break_ability_in_cs();

    /// <summary>
    /// 获取最近的技能可升级等级
    /// </summary>
    /// <returns>等级</returns>
    public extern int? api_get_ability_nearest_upgradable_unit_level();

    /// <summary>
    /// 获取技能编号
    /// </summary>
    /// <returns>技能编号</returns>
    public extern int? api_get_ability_id();

    /// <summary>
    /// 是否是近战技能
    /// </summary>
    /// <returns>布尔值</returns>
    public extern bool? api_is_melee_ability();

    /// <summary>
    /// 是否是普攻
    /// </summary>
    /// <returns>布尔值</returns>
    public extern bool? api_is_common_atk();

    /// <summary>
    /// 是否是被动
    /// </summary>
    /// <returns>布尔值</returns>
    public extern bool? is_passive_ability();

    /// <summary>
    /// 获取消耗生命是否致死
    /// </summary>
    /// <returns>消耗生命是否致死</returns>
    public extern bool? api_get_cost_hp_can_die();

    /// <summary>
    /// 设置消耗生命是否致死
    /// </summary>
    /// <param name="value"> 能否释放 </param>
    /// <returns></returns>
    public extern void api_set_cost_hp_can_die(bool? value);

    /// <summary>
    /// 获取生命不足能否施放
    /// </summary>
    /// <returns>生命不足能否施放</returns>
    public extern bool? api_get_can_cast_when_hp_insufficient();

    /// <summary>
    /// 设置生命不足能否施放
    /// </summary>
    /// <param name="value"> 能否释放 </param>
    /// <returns></returns>
    public extern void api_set_can_cast_when_hp_insufficient(bool? value);

    /// <summary>
    /// 获取技能名称
    /// </summary>
    /// <returns>技能名称</returns>
    public extern string api_get_name();

    /// <summary>
    /// 设置技能是否受冷却缩减影响
    /// </summary>
    /// <param name="value"> 布尔属性值 </param>
    /// <returns></returns>
    public extern void api_set_influenced_by_cd_reduce(bool? value);

    /// <summary>
    /// 是否受冷却缩减影响
    /// </summary>
    /// <returns>布尔值</returns>
    public extern bool? api_get_influenced_by_cd_reduce();

    /// <summary>
    /// 获取技能的充能层数
    /// </summary>
    /// <returns>技能层数</returns>
    public extern int? api_get_ability_stack();

    /// <summary>
    /// 增加技能充能层数
    /// </summary>
    /// <param name="value"> 充能层数 </param>
    /// <returns></returns>
    public extern void api_add_ability_stack_count(int? value);

    /// <summary>
    /// 设置技能充能层数
    /// </summary>
    /// <param name="value"> 充能层数 </param>
    /// <returns></returns>
    public extern void api_set_ability_stack_count(int? value);

    /// <summary>
    /// 获取当前技能剩余冷却时间
    /// </summary>
    /// <returns>剩余冷却时间</returns>
    public extern Fix32 api_get_cd_left_time();

    /// <summary>
    /// 技能立即冷却
    /// </summary>
    /// <returns></returns>
    public extern void api_immediately_clear_cd();

    /// <summary>
    /// 改变技能冷却时间
    /// </summary>
    /// <param name="value"> 冷却时间 </param>
    /// <returns></returns>
    public extern void api_change_ability_cd_cold_down(Fix32 value);

    /// <summary>
    /// 设置技能冷却时间
    /// </summary>
    /// <param name="value"> 冷却时间 </param>
    /// <returns></returns>
    public extern void api_set_ability_cd(Fix32 value);

    /// <summary>
    /// 增加技能冷却时间
    /// </summary>
    /// <param name="value"> 冷却时间 </param>
    /// <returns></returns>
    public extern void api_add_ability_cd(Fix32 value);

    /// <summary>
    /// 从头开始冷却
    /// </summary>
    /// <returns></returns>
    public extern void api_restart_cd();

    /// <summary>
    /// 改变当次充能时间
    /// </summary>
    /// <param name="value"> 冷却时间 </param>
    /// <returns></returns>
    public extern void api_set_ability_cur_stack_cd(Fix32 value);

    /// <summary>
    /// 获取技能当前剩余充能时间
    /// </summary>
    /// <returns>剩余充能时间</returns>
    public extern Fix32 api_get_stack_cd_left_time();

    /// <summary>
    /// 启用技能
    /// </summary>
    /// <returns></returns>
    public extern void api_enable();

    /// <summary>
    /// 禁用技能
    /// </summary>
    /// <returns></returns>
    public extern void api_disable();

    /// <summary>
    /// 对技能所属单位的所属玩家关系播放音乐
    /// </summary>
    /// <param name="camp_target"> 玩家关系 </param>
    /// <param name="sid"> 乐曲编号 </param>
    /// <param name="loop"> 是否循环 </param>
    /// <returns></returns>
    public extern void api_play_sound_by_ability_for_role_relation(int? camp_target,int? sid,bool? loop);

    /// <summary>
    /// 开关自动施法
    /// </summary>
    /// <param name="b"> 开关 </param>
    /// <returns></returns>
    public extern void api_set_autocast_enabled(bool? b);

    /// <summary>
    /// 自动施法是否开启
    /// </summary>
    /// <returns>是否开启</returns>
    public extern bool? api_is_autocast_enabled();

}
